.class public Lcom/glympse/platform/common/LocPoint;
.super Ljava/lang/Object;
.source "LocPoint.java"


# static fields
.field public static final ELocProvider_GPS:I = 0x1

.field public static final ELocProvider_Network:I = 0x2

.field public static final ELocProvider_Skyhook:I = 0x3

.field public static final ELocProvider_Unknown:I = 0x0

.field public static final ELocProvider_Verizon:I = 0x4


# instance fields
.field public m_dLatitude:D

.field public m_dLongitude:D

.field public m_eLocProvider:I

.field public m_fltAccuracyMeters:F

.field public m_fltAltitudeMeters:F

.field public m_fltBearingDegrees:F

.field public m_fltSpeedMetersPerSecond:F

.field public m_lLocationTime:J

.field private m_lSystemTime:J


# direct methods
.method public constructor <init>()V
    .locals 6

    .prologue
    const-wide/16 v4, 0x0

    const-wide/high16 v2, 0x7ff8

    const/high16 v1, 0x7fc0

    .line 33
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 22
    const/4 v0, 0x0

    iput v0, p0, Lcom/glympse/platform/common/LocPoint;->m_eLocProvider:I

    .line 23
    iput-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    .line 24
    iput-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    .line 25
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltAltitudeMeters:F

    .line 26
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    .line 27
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    .line 28
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltAccuracyMeters:F

    .line 29
    iput-wide v4, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    .line 30
    iput-wide v4, p0, Lcom/glympse/platform/common/LocPoint;->m_lSystemTime:J

    .line 35
    return-void
.end method

.method public constructor <init>(Lcom/glympse/platform/common/LocPoint;)V
    .locals 6
    .parameter "oLocPoint"

    .prologue
    const-wide/16 v4, 0x0

    const-wide/high16 v2, 0x7ff8

    const/high16 v1, 0x7fc0

    .line 47
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 22
    const/4 v0, 0x0

    iput v0, p0, Lcom/glympse/platform/common/LocPoint;->m_eLocProvider:I

    .line 23
    iput-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    .line 24
    iput-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    .line 25
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltAltitudeMeters:F

    .line 26
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    .line 27
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    .line 28
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltAccuracyMeters:F

    .line 29
    iput-wide v4, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    .line 30
    iput-wide v4, p0, Lcom/glympse/platform/common/LocPoint;->m_lSystemTime:J

    .line 49
    iget v0, p1, Lcom/glympse/platform/common/LocPoint;->m_eLocProvider:I

    iput v0, p0, Lcom/glympse/platform/common/LocPoint;->m_eLocProvider:I

    .line 50
    iget-wide v0, p1, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    iput-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    .line 51
    iget-wide v0, p1, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    iput-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    .line 52
    iget v0, p1, Lcom/glympse/platform/common/LocPoint;->m_fltAltitudeMeters:F

    iput v0, p0, Lcom/glympse/platform/common/LocPoint;->m_fltAltitudeMeters:F

    .line 53
    iget v0, p1, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    iput v0, p0, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    .line 54
    iget v0, p1, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    iput v0, p0, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    .line 55
    iget v0, p1, Lcom/glympse/platform/common/LocPoint;->m_fltAccuracyMeters:F

    iput v0, p0, Lcom/glympse/platform/common/LocPoint;->m_fltAccuracyMeters:F

    .line 56
    iget-wide v0, p1, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    iput-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    .line 57
    iget-wide v0, p1, Lcom/glympse/platform/common/LocPoint;->m_lSystemTime:J

    iput-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_lSystemTime:J

    .line 58
    return-void
.end method

.method public constructor <init>(Z)V
    .locals 6
    .parameter "fCorrectTime"

    .prologue
    const-wide/16 v4, 0x0

    const-wide/high16 v2, 0x7ff8

    const/high16 v1, 0x7fc0

    .line 38
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 22
    const/4 v0, 0x0

    iput v0, p0, Lcom/glympse/platform/common/LocPoint;->m_eLocProvider:I

    .line 23
    iput-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    .line 24
    iput-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    .line 25
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltAltitudeMeters:F

    .line 26
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    .line 27
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    .line 28
    iput v1, p0, Lcom/glympse/platform/common/LocPoint;->m_fltAccuracyMeters:F

    .line 29
    iput-wide v4, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    .line 30
    iput-wide v4, p0, Lcom/glympse/platform/common/LocPoint;->m_lSystemTime:J

    .line 40
    if-eqz p1, :cond_0

    .line 42
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_lSystemTime:J

    .line 44
    :cond_0
    return-void
.end method


# virtual methods
.method public GetTime()J
    .locals 8

    .prologue
    const-wide/16 v6, 0x7530

    .line 79
    iget-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_lSystemTime:J

    const-wide/16 v4, 0x0

    cmp-long v2, v2, v4

    if-lez v2, :cond_2

    .line 83
    iget-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_lSystemTime:J

    invoke-static {v2, v3}, Lcom/glympse/platform/common/CorrectedTime;->GetTime(J)J

    move-result-wide v0

    .line 87
    .local v0, lCorrected:J
    iget-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    cmp-long v2, v0, v2

    if-ltz v2, :cond_0

    iget-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    sub-long v2, v0, v2

    cmp-long v2, v2, v6

    if-gez v2, :cond_1

    .line 88
    :cond_0
    iget-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    cmp-long v2, v0, v2

    if-gez v2, :cond_2

    iget-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    sub-long/2addr v2, v0

    cmp-long v2, v2, v6

    if-ltz v2, :cond_2

    .line 90
    :cond_1
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "LocPoint.GetTime() is returning corrected time.  Location:"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-wide v3, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    invoke-virtual {v2, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ", Corrected:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ", System:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-wide v3, p0, Lcom/glympse/platform/common/LocPoint;->m_lSystemTime:J

    invoke-virtual {v2, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    move-wide v2, v0

    .line 99
    .end local v0           #lCorrected:J
    :goto_0
    return-wide v2

    :cond_2
    iget-wide v2, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    goto :goto_0
.end method

.method public HasAccuracy()Z
    .locals 1

    .prologue
    .line 72
    iget v0, p0, Lcom/glympse/platform/common/LocPoint;->m_fltAccuracyMeters:F

    invoke-static {v0}, Ljava/lang/Float;->isNaN(F)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public HasAltitude()Z
    .locals 1

    .prologue
    .line 69
    iget v0, p0, Lcom/glympse/platform/common/LocPoint;->m_fltAltitudeMeters:F

    invoke-static {v0}, Ljava/lang/Float;->isNaN(F)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public HasBearing()Z
    .locals 1

    .prologue
    .line 70
    iget v0, p0, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    invoke-static {v0}, Ljava/lang/Float;->isNaN(F)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public HasLocation()Z
    .locals 4

    .prologue
    const-wide/16 v2, 0x0

    .line 63
    iget-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z

    move-result v0

    if-nez v0, :cond_0

    iget-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z

    move-result v0

    if-nez v0, :cond_0

    .line 64
    iget-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    cmpl-double v0, v2, v0

    if-eqz v0, :cond_0

    iget-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    cmpl-double v0, v2, v0

    if-eqz v0, :cond_0

    .line 65
    iget-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    const-wide v2, -0x3fa9800000000000L

    cmpl-double v0, v0, v2

    if-ltz v0, :cond_0

    iget-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    const-wide v2, 0x4056800000000000L

    cmpg-double v0, v0, v2

    if-gtz v0, :cond_0

    .line 66
    iget-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    const-wide v2, -0x3f99800000000000L

    cmpl-double v0, v0, v2

    if-ltz v0, :cond_0

    iget-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    const-wide v2, 0x4066800000000000L

    cmpg-double v0, v0, v2

    if-gtz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    .line 63
    goto :goto_0
.end method

.method public HasSpeed()Z
    .locals 1

    .prologue
    .line 71
    iget v0, p0, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    invoke-static {v0}, Ljava/lang/Float;->isNaN(F)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public HasTime()Z
    .locals 4

    .prologue
    const-wide/16 v2, 0x0

    .line 73
    iget-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    cmp-long v0, v0, v2

    if-gtz v0, :cond_0

    iget-wide v0, p0, Lcom/glympse/platform/common/LocPoint;->m_lSystemTime:J

    cmp-long v0, v0, v2

    if-gtz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method
